import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);
        int n = num.nextInt();
        int count = 0;
        while(n != 1){
            if(n % 2 == 0){
               n = n/2;
                count++;
            }else {
                n = n * 3 + 1;
                count++;
            }
            if(n == 1){
                break;
            }
        }
        System.out.println(count);
    }
}
